package com.lsf.dunlian.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager;

import com.lsf.dunlian.R;
import com.lsf.dunlian.adapter.FollowUpListRecyclerViewAdapter;
import com.lsf.dunlian.databinding.ActivityAddFollowupBinding;
import com.mylhyl.superdialog.SuperDialog;
import com.mylhyl.superdialog.res.values.ColorRes;

import java.util.Arrays;
import java.util.List;

public class AddFollowUpActivity extends FragmentActivity {
    private List<String> a= Arrays.asList("当面拜访","电话拜访","微信拜访");
    private ActivityAddFollowupBinding binding;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        BaseUtils.setStatusBar(this);
        binding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_add_followup, null, false);
        setContentView(binding.getRoot());

        binding.genjinfangshi.setOnClickListener(v -> new SuperDialog.Builder(AddFollowUpActivity.this)
                .setGravity(Gravity.CENTER)
                .setTitle("跟进方式", ColorRes.negativeButton)
                .setCanceledOnTouchOutside(false)
                .setItems(a, position -> {
                    binding.genjinfangshi.setText(a.get(position));
                })
                .setNegativeButton("取消", null)
                .build());

    }
}
